//
//  ZCSingerTableViewCell.m
//  VoiceMusic
//
//  Created by dllo on 15/10/21.
//  Copyright © 2015年 zhangdeyu. All rights reserved.
//

#import "ZCSingerTableViewCell.h"
#import <Masonry.h>
#import <UIImageView+WebCache.h>
#import "ZCBaseLabel.h"
@implementation ZCSingerTableViewCell
- (void)layoutSubviews
{
    [self superview];
    [self.picImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(5);
        make.left.equalTo(self.contentView).offset(10);
        make.bottom.equalTo(self.contentView).offset(-5);
        make.width.equalTo(@80);
    }];
    self.picImageView.layer.cornerRadius = 35;
    self.picImageView.layer.masksToBounds = YES;
    
    [self.detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(5);
        make.right.equalTo(self.contentView).offset(0);
        make.bottom.equalTo(self.contentView).offset(-5);
        make.left.equalTo(self.picImageView.mas_right).offset(10);
    }];
    [self.detailLabel setTextColor:[UIColor whiteColor]];
    [self.detailLabel setFont:[UIFont boldSystemFontOfSize:25]];
    self.detailLabel.textAlignment = NSTextAlignmentCenter;
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)getInfo:(ZCSigerModel *)model
{
    [self.picImageView sd_setImageWithURL:[NSURL URLWithString:model.pic_url] placeholderImage:[UIImage imageNamed:@"2015"]];
    [self.detailLabel setText:model.singer_name];
}

@end
